cmake_minimum_required(VERSION 3.20)

if(POLICY CMP0042)
    cmake_policy(SET CMP0042 NEW)  # CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name
endif()

# set the project name and version
set(CMAKE_TOOLCHAIN_FILE "/Users/didi/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
project(BoostTutorial VERSION 1.0)
message(STATUS "root This is BINARY dir " ${PROJECT_BINARY_DIR})
message(STATUS "root This is SOURCE dir " ${PROJECT_SOURCE_DIR})
message(STATUS "root This is SOURCE dir " ${CMAKE_SOURCE_DIR})
message(STATUS "root This is SOURCE dir " ${CMAKE_CURRENT_SOURCE_DIR})

# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# 添加子目录
ADD_SUBDIRECTORY(src)

#如何编译和使用
# mkdir -p D2Tools/T2YamlCpp/build
# cd D2Tools/T2YamlCpp/build
# cmake ..
# make or cmake --build .